var page = require('webpage').create();
//page.zoomFactor=1.5
page.viewportSize = {width: 1600, height: 1024};
page.open('https://jira.foxitsoftware.cn/secure/Dashboard.jspa?selectPageId=15740&os_username=juan_yao&os_password=janice566', function() {
 window.setTimeout(function () {
     page.evaluate(function() {

	 var today = new Date();
     var text = window.document.getElementsByClassName("aui-page-header-main")[0].children[0].textContent;
     window.document.getElementsByClassName("aui-page-header-main")[0].children[0].innerText=text+" "+today
    });
      page.clipRect = { left: 185, top: 40, width: 1400, height: 1000 };
    page.render('jira.png');
     page.render('jira.pdf');
     phantom.exit();
}, 20000 );

});
